package com.test.application.designPatterns.principles_design.yilaidaozhuan.after;

import com.test.application.designPatterns.principles_design.yilaidaozhuan.after.service.Cpu;
import com.test.application.designPatterns.principles_design.yilaidaozhuan.after.service.HardDisk;
import com.test.application.designPatterns.principles_design.yilaidaozhuan.after.service.Memory;
import lombok.Data;

/**
 * 描述: 电脑
 * 作者: yanruizhi
 * 时间: 2024/9/18 14:38
 */

@Data
public class Computer {
    private Cpu cpu;
    private Memory memory;
    private HardDisk hardDisk;


    public void run( ) {
        System.out.println("电脑开始运行...");
        cpu.run();
        memory.save();
        hardDisk.save();
    }
}
